/*
 * Copyright 2020-2021 the original author or authors.
 *
 * Licensed under the General Public License, Version 3.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.gnu.org/licenses/gpl-3.0.en.html
 */

package team.seekers.oj.group.converter;

import team.seekers.oj.common.converter.BaseConverter;

import java.util.List;


@org.mapstruct.MapperConfig
public interface BaseGroupConverter<S, T> extends BaseConverter<S, T> {

    default List<Long> groupUsersTo(byte[] users) {
        return GroupConvertUtils.groupUsersToUserIdList(users);
    }

    default byte[] groupUsersFrom(List<Long> userIds) {
        return GroupConvertUtils.groupUsersFromUserIdList(userIds);
    }

}